{% extends "base.html" %}

{% block content %}
	{% if is_paginated %}
		<div class="pagination">
		    <span class="step-links">
		        {% if page_obj.has_previous %}
		            <a href="/?page={{ page_obj.previous_page_number }}">previous</a>
		        {% endif %}
		
		        <span class="current">
		            Posts {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
		        </span>
		
		        {% if page_obj.has_next %}
		            <a href="/?page={{ page_obj.next_page_number }}">next</a>
		        {% endif %}
		    </span>
		</div>
	{% endif %}
	{% if post_list.count %}
		{% for post in post_list %}
			{% include "blog/post.html" %}
		{% endfor %}
	{% else %}
		<p>There are no items to display...</p>
	{% endif %}
{% endblock %}